@extends('master')
@section('content')
<div class="topic-index">
    <div class="container">
        @if(count($topics) == 0)
        <div class="alert alert-danger" role="alert">暂无专题！</div>
        @endif
        <div id="topic-list" class="topic-list">
            @foreach($topics as $topic)
            <div class="row col-sm-12 item">

                @foreach($topic->pictures as $key => $picture)
                    @if($key == 0)
                     <a href="/topic/info/{{ $topic->id }}" class="{{ $key == 0?'first-image':'' }}">
                      <img src="{{ '/uploads/picture/' . $picture->thumb }}" alt="" />


                      <span><i>{{ $topic->name }}</i></span>

                      </a>
                    @else
                      <a href="javascript:void(0)" class="{{ $key == 0?'first-image':'' }}" data-remote="/picture/info/{{ $picture->id }}" data-toggle="modal" data-target="#photo-modal" data-action="photo-detail">
                      <img src="{{ '/uploads/picture/' . $picture->thumb . '.JPG' }}" alt="" />
                      </a>
                    @endif
                @endforeach

            </div>
            @endforeach


        </div>
    </div>
</div>

@stop




